#ifndef RECORD_EVENT_H
#define RECORD_EVENT_H
#include "partitionindex.h"
#define EVENT_CONTAINER_SIZE 			256

#ifdef __cplusplus
extern "C" {
#endif

int event_buf_mutex_init();
int event_buf_mutex_lock();
int event_buf_mutex_unlock();

u32 event_verify_value(const ifly_event_header_t *event_header);
int gen_event_file(const char *filepath, u32 filecount);
int read_event_header(const u8* event_dir);
void event_attr_tobuf(u32 event_type, u32 event_time);
void event_state_fxn(void *arg);
void deal_event_header(u32 remain_event_nums);
void write_event(FILE *event_fp,u32 file_position,u32 remain_event_nums);
int writebuf_to_eventfile();
void updata_event_io_name();
int set_event_file_dir(u8 *pPath);
u32 get_event_offset();
u32 clear_event_buf();
#ifdef __cplusplus
}
#endif
#endif
